/* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2016 @version 1.3.4 Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format. @see http://php.net/manual/en/function.date.php For more JQuery plugins visit http://plugins.krajee.com For more Yii related demos visit http://demos.krajee.com jQuery DateTimePicker @homepage http://xdsoft.net/jqplugins/datetimepicker/ @author Chupurnov Valeriy () jQuery Mousewheel 3.1.13 Copyright jQuery Foundation and other contributors Released under the MIT license http://jquery.org/license */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.owns=function(a,g){return Object.prototype.hasOwnProperty.call(a,g)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,g,p){a!=Array.prototype&&a!=Object.prototype&&(a[g]=p.value)}; $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,g,p,k){if(g){p=$jscomp.global;a=a.split(".");for(k=0;ke?"20":"19")+g):e;v=!0;break;case "m":case "n":case "M":case "F":if(isNaN(e)){if(n= this.getMonth(g),!(0=e))return null;p=e}v=!0;break;case "d":case "j":if(!(1<=e&&31>=e))return null;m=e;v=!0;break;case "g":case "h":if(d=-1=e&&-1=e&&(q=e);else{if(!(0<=e&&23>=e))return null;q=e}t=!0;break;case "G":case "H":if(!(0<=e&&23>=e))return null;q=e;t=!0;break;case "i":if(!(0<=e&&59>=e))return null; D=e;t=!0;break;case "s":if(!(0<=e&&59>=e))return null;w=e;t=!0}if(!0===v&&b&&p&&m)c=new Date(b,p-1,m,q,D,w,0);else{if(!0!==t)return null;c=new Date(0,0,0,q,D,w,0)}return c},guessDate:function(a,e){if("string"!=typeof a)return a;var c,k,g,n,d,v=a.replace(this.separators,"\x00").split("\x00");e=e.match(this.validParts);var t=new Date;if(!/^[djmn]/g.test(e[0]))return a;for(a=0;ac?c:4,k=parseInt(4>c?k.toString().substr(0,4-c)+n:n.substr(0,4)),!k)return null;t.setFullYear(k);break;case 3:t.setHours(d);break;case 4:t.setMinutes(d);break;case 5:t.setSeconds(d)}g=n.substr(g);0d?1:1===a&&9c.G()?0:1;return r.meridiem[a]},B:function(){var a=3600*e.getUTCHours(),d=60*e.getUTCMinutes(),c=e.getUTCSeconds(); return g(Math.floor((a+d+c+3600)/86.4)%1E3,3)},g:function(){return c.G()%12||12},G:function(){return e.getHours()},h:function(){return g(c.g(),2)},H:function(){return g(c.G(),2)},i:function(){return g(e.getMinutes(),2)},s:function(){return g(e.getSeconds(),2)},u:function(){return g(1E3*e.getMilliseconds(),6)},e:function(){return/\((.*)\)/.exec(String(e))[1]||"Coordinated Universal Time"},I:function(){var a=new Date(c.Y(),0),d=Date.UTC(c.Y(),0),e=new Date(c.Y(),6),b=Date.UTC(c.Y(),6);return a-d!== e-b?1:0},O:function(){var a=e.getTimezoneOffset(),d=Math.abs(a);return(0c;c++){var v=e.charAt(c);"S"!==v&&"\\"!==v&&(0');var F=a('
');K.append(F);c.addClass("xdsoft_scroller_box").append(K);v=function(a){a=k(a).y-n+m;0>a&&(a=0);a+ F[0].offsetHeight>p&&(a=p-F[0].offsetHeight);c.trigger("scroll_element.xdsoft_scroller",[b?a/b:0])};F.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(b){H||c.trigger("resize_scroll.xdsoft_scroller",[e]);n=k(b).y;m=parseInt(F.css("margin-top"),10);p=K[0].offsetHeight;"mousedown"===b.type||"touchstart"===b.type?(d.ownerDocument&&a(d.ownerDocument.body).addClass("xdsoft_noselect"),a([d.ownerDocument.body,d.contentWindow]).on("touchend mouseup.xdsoft_scroller",function B(){a([d.ownerDocument.body, d.contentWindow]).off("touchend mouseup.xdsoft_scroller",B).off("mousemove.xdsoft_scroller",v).removeClass("xdsoft_noselect")}),a(d.ownerDocument.body).on("mousemove.xdsoft_scroller",v)):(w=!0,b.stopPropagation(),b.preventDefault())}).on("touchmove",function(b){w&&(b.preventDefault(),v(b))}).on("touchend touchcancel",function(){w=!1;m=0});c.on("scroll_element.xdsoft_scroller",function(a,e){H||c.trigger("resize_scroll.xdsoft_scroller",[e,!0]);e=1e||isNaN(e)?0:e;F.css("margin-top",b*e);setTimeout(function(){h.css("marginTop", -parseInt((h[0].offsetHeight-H)*e,10))},10)}).on("resize_scroll.xdsoft_scroller",function(a,e,d){H=c[0].clientHeight;J=h[0].offsetHeight;a=H/J;var k=a*K[0].offsetHeight;1a&&(a=0);c.trigger("scroll_element.xdsoft_scroller", [a/(J-H)]);b.stopPropagation();return!1});c.on("touchstart",function(b){g=k(b);r=Math.abs(parseInt(h.css("marginTop"),10))});c.on("touchmove",function(b){g&&(b.preventDefault(),b=k(b),c.trigger("scroll_element.xdsoft_scroller",[(r-(b.y-g.y))/(J-H)]))});c.on("touchend touchcancel",function(){g=!1;r=0})}c.trigger("resize_scroll.xdsoft_scroller",[e])}})};a.fn.datetimepicker=function(e,c){var d=this,n=!1,b=a.isPlainObject(e)||!e?a.extend(!0,{},p,e):a.extend(!0,{},p),m=0,v=function(b){b.on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart", function W(){b.is(":disabled")||b.data("xdsoft_datetimepicker")||(clearTimeout(m),m=setTimeout(function(){b.data("xdsoft_datetimepicker")||q(b);b.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",W).trigger("open.xdsoft")},100))})};var q=function(c){function d(){if(b.startDate)var a=l.strToDate(b.startDate);else if(a=b.value||(c&&c.val&&c.val()?c.val():""))a=l.strToDateTime(a),b.yearOffset&&(a=new Date(a.getFullYear()-b.yearOffset,a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(), a.getMilliseconds()));else if(b.defaultDate&&(a=l.strToDateTime(b.defaultDate),b.defaultTime)){var u=l.strtotime(b.defaultTime);a.setHours(u.getHours());a.setMinutes(u.getMinutes())}a&&l.isValidDate(a)?h.data("changed",!0):a="";return a||0}function t(b){var f=function(b,a){b=b.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return(new RegExp(b)).test(a)},e= function(a,f){a="string"===typeof a||a instanceof String?b.ownerDocument.getElementById(a):a;return a?a.createTextRange?(a=a.createTextRange(),a.collapse(!0),a.moveEnd("character",f),a.moveStart("character",f),a.select(),!0):a.setSelectionRange?(a.setSelectionRange(f,f),!0):!1:!1};b.mask&&c.off("keydown.xdsoft");!0===b.mask&&(b.mask=k.formatMask?k.formatMask(b.format):b.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g, "59"));"string"===a.type(b.mask)&&(f(b.mask,c.val())||(c.val(b.mask.replace(/[0-9]/g,"_")),e(c[0],0)),c.on("paste.xdsoft",function(u){var y=(u.clipboardData||u.originalEvent.clipboardData||window.clipboardData).getData("text"),d=this.value,h=this.selectionStart,l=d.substr(0,h);d=d.substr(h+y.length);d=l+y+d;h+=y.length;f(b.mask,d)?(this.value=d,e(this,h)):""===a.trim(d)?this.value=b.mask.replace(/[0-9]/g,"_"):c.trigger("error_input.xdsoft");u.preventDefault();return!1}),c.on("keydown.xdsoft",function(u){var y= this.value,d=u.which,h=this.selectionStart,l=this.selectionEnd,k=h!==l;if(48<=d&&57>=d||96<=d&&105>=d||8===d||46===d){var N=8===d||46===d?"_":String.fromCharCode(96<=d&&105>=d?d-48:d);for(8===d&&h&&!k&&--h;;){var g=b.mask.substr(h,1),m=h'),p=a(''), w=a('
'),m=a('
'),v=a('
'),x=a('
'), q=x.find(".xdsoft_time_box").eq(0),B=a('
'),z=a(''),E=a('
'),G=a('
'),M=!1,D=0;b.id&&h.attr("id",b.id);b.style&&h.attr("style",b.style);b.weeks&&h.addClass("xdsoft_showweeks");b.rtl&&h.addClass("xdsoft_rtl");h.addClass("xdsoft_"+b.theme);h.addClass(b.className); m.find(".xdsoft_month span").after(E);m.find(".xdsoft_year span").after(G);m.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(f){var u=a(this).find(".xdsoft_select").eq(0),y=0,e=0,c=u.is(":visible"),d;m.find(".xdsoft_select").hide();l.currentTime&&(y=l.currentTime[a(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]());u[c?"hide":"show"]();c=u.find("div.xdsoft_option");for(d=0;db.touchMovedThreshold&&(this.touchMoved=!0)};m.find(".xdsoft_select").xdsoftScroller(b).on("touchstart mousedown.xdsoft",function(b){var a=b.originalEvent;this.touchMoved=!1;this.touchStartPosition=a.touches? a.touches[0]:a;b.stopPropagation();b.preventDefault()}).on("touchmove",".xdsoft_option",L).on("touchend mousedown.xdsoft",".xdsoft_option",function(){if(!this.touchMoved){if(void 0===l.currentTime||null===l.currentTime)l.currentTime=l.now();var f=l.currentTime.getFullYear();if(l&&l.currentTime)l.currentTime[a(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](a(this).data("value"));a(this).parent().parent().hide();h.trigger("xchange.xdsoft");b.onChangeMonth&&a.isFunction(b.onChangeMonth)&& b.onChangeMonth.call(h,l.currentTime,h.data("input"));f!==l.currentTime.getFullYear()&&a.isFunction(b.onChangeYear)&&b.onChangeYear.call(h,l.currentTime,h.data("input"))}});h.getValue=function(){return l.getCurrentTime()};h.setOptions=function(f){var u={};b=a.extend(!0,{},b,f);f.allowTimes&&a.isArray(f.allowTimes)&&f.allowTimes.length&&(b.allowTimes=a.extend(!0,[],f.allowTimes));f.weekends&&a.isArray(f.weekends)&&f.weekends.length&&(b.weekends=a.extend(!0,[],f.weekends));f.allowDates&&a.isArray(f.allowDates)&& f.allowDates.length&&(b.allowDates=a.extend(!0,[],f.allowDates));f.allowDateRe&&"[object String]"===Object.prototype.toString.call(f.allowDateRe)&&(b.allowDateRe=new RegExp(f.allowDateRe));f.highlightedDates&&a.isArray(f.highlightedDates)&&f.highlightedDates.length&&(a.each(f.highlightedDates,function(f,c){f=a.map(c.split(","),a.trim);c=new g(k.parseDate(f[0],b.formatDate),f[1],f[2]);var e=k.formatDate(c.date,b.formatDate);void 0!==u[e]?(f=u[e].desc)&&f.length&&c.desc&&c.desc.length&&(u[e].desc=f+ "\n"+c.desc):u[e]=c}),b.highlightedDates=a.extend(!0,[],u));f.highlightedPeriods&&a.isArray(f.highlightedPeriods)&&f.highlightedPeriods.length&&(u=a.extend(!0,[],b.highlightedDates),a.each(f.highlightedPeriods,function(f,c){var e;if(a.isArray(c)){f=c[0];var d=c[1];var y=c[2];var h=c[3]}else c=a.map(c.split(","),a.trim),f=k.parseDate(c[0],b.formatDate),d=k.parseDate(c[1],b.formatDate),y=c[2],h=c[3];for(;f<=d;){c=new g(f,y,h);var l=k.formatDate(f,b.formatDate);f.setDate(f.getDate()+1);void 0!==u[l]? (e=u[l].desc)&&e.length&&c.desc&&c.desc.length&&(u[l].desc=e+"\n"+c.desc):u[l]=c}}),b.highlightedDates=a.extend(!0,[],u));f.disabledDates&&a.isArray(f.disabledDates)&&f.disabledDates.length&&(b.disabledDates=a.extend(!0,[],f.disabledDates));f.disabledWeekDays&&a.isArray(f.disabledWeekDays)&&f.disabledWeekDays.length&&(b.disabledWeekDays=a.extend(!0,[],f.disabledWeekDays));!b.open&&!b.opened||b.inline||c.trigger("open.xdsoft");b.inline&&(M=!0,h.addClass("xdsoft_inline"),c.after(h).hide());b.inverseButton&& (b.next="xdsoft_prev",b.prev="xdsoft_next");b.datepicker?w.addClass("active"):w.removeClass("active");b.timepicker?x.addClass("active"):x.removeClass("active");b.value&&(l.setCurrentTime(b.value),c&&c.val&&c.val(l.str));isNaN(b.dayOfWeekStart)?b.dayOfWeekStart=0:b.dayOfWeekStart=parseInt(b.dayOfWeekStart,10)%7;b.timepickerScrollbar||q.xdsoftScroller(b,"hide");b.minDate&&/^[\+\-](.*)$/.test(b.minDate)&&(b.minDate=k.formatDate(l.strToDateTime(b.minDate),b.formatDate));b.maxDate&&/^[\+\-](.*)$/.test(b.maxDate)&& (b.maxDate=k.formatDate(l.strToDateTime(b.maxDate),b.formatDate));b.minDateTime&&/^\+(.*)$/.test(b.minDateTime)&&(b.minDateTime=l.strToDateTime(b.minDateTime).dateFormat(b.formatDate));b.maxDateTime&&/^\+(.*)$/.test(b.maxDateTime)&&(b.maxDateTime=l.strToDateTime(b.maxDateTime).dateFormat(b.formatDate));z.toggle(b.showApplyButton);m.find(".xdsoft_today_button").css("visibility",b.todayButton?"visible":"hidden");m.find("."+b.prev).css("visibility",b.prevButton?"visible":"hidden");m.find("."+b.next).css("visibility", b.nextButton?"visible":"hidden");t(b);if(b.validateOnBlur)c.off("blur.xdsoft").on("blur.xdsoft",function(){if(b.allowBlank&&(!a.trim(a(this).val()).length||"string"===typeof b.mask&&a.trim(a(this).val())===b.mask.replace(/[0-9]/g,"_")))a(this).val(null),h.data("xdsoft_datetime").empty();else{var f=k.parseDate(a(this).val(),b.format);if(f)a(this).val(k.formatDate(f,b.format));else{f=+[a(this).val()[0],a(this).val()[1]].join("");var c=+[a(this).val()[2],a(this).val()[3]].join("");!b.datepicker&&b.timepicker&& 0<=f&&24>f&&0<=c&&60>c?a(this).val([f,c].map(function(b){return 9e||(c.val(l.str()),c.trigger("change"),h.trigger("close.xdsoft")))});m.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var c=a(this),e=0,d=!1;(function Q(a){c.hasClass(b.next)? l.nextMonth():c.hasClass(b.prev)&&l.prevMonth();b.monthChangeSpinner&&(d||(e=setTimeout(Q,a||100)))})(500);a([b.ownerDocument.body,b.contentWindow]).on("touchend mouseup.xdsoft",function Q(){clearTimeout(e);d=!0;a([b.ownerDocument.body,b.contentWindow]).off("touchend mouseup.xdsoft",Q)})});x.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var c=a(this),e=0,d=!1,h=110;(function R(a){var f=q[0].clientHeight,l=B[0].offsetHeight,k=Math.abs(parseInt(B.css("marginTop"),10)); c.hasClass(b.next)&&l-f-b.timeHeightInTimePicker>=k?B.css("marginTop","-"+(k+b.timeHeightInTimePicker)+"px"):c.hasClass(b.prev)&&0<=k-b.timeHeightInTimePicker&&B.css("marginTop","-"+(k-b.timeHeightInTimePicker)+"px");q.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(B[0].style.marginTop,10)/(l-f))]);h=10";b.weeks&&(f+="");for(n=0;7>n;n+=1)f+=""+b.i18n[r].dayOfWeekShort[(n+b.dayOfWeekStart)%7]+"";f+= "";!1!==b.maxDate&&(w=l.strToDate(b.maxDate),w=new Date(w.getFullYear(),w.getMonth(),w.getDate(),23,59,59,999));!1!==b.minDate&&(p=l.strToDate(b.minDate),p=new Date(p.getFullYear(),p.getMonth(),p.getDate()));!1!==b.minDateTime&&(q=l.strToDate(b.minDateTime),q=new Date(q.getFullYear(),q.getMonth(),q.getDate(),q.getHours(),q.getMinutes(),q.getSeconds()));!1!==b.maxDateTime&&(x=l.strToDate(b.maxDateTime),x=new Date(x.getFullYear(),x.getMonth(),x.getDate(),x.getHours(),x.getMinutes(), x.getSeconds()));var K;for(!1!==x&&(K=31*(12*x.getFullYear()+x.getMonth())+x.getDate());gw||!1!==q&&dK||D&&!1===D[0])&&A.push("xdsoft_disabled");-1!==b.disabledDates.indexOf(k.formatDate(d,b.formatDate))&&A.push("xdsoft_disabled");-1!==b.disabledWeekDays.indexOf(z)&&A.push("xdsoft_disabled");c.is("[disabled]")&&A.push("xdsoft_disabled"); D&&""!==D[1]&&A.push(D[1]);l.currentTime.getMonth()!==C&&A.push("xdsoft_other_month");(b.defaultSelect||h.data("changed"))&&k.formatDate(l.currentTime,b.formatDate)===k.formatDate(d,b.formatDate)&&A.push("xdsoft_current");k.formatDate(t,b.formatDate)===k.formatDate(d,b.formatDate)&&A.push("xdsoft_today");0!==d.getDay()&&6!==d.getDay()&&-1===b.weekends.indexOf(k.formatDate(d,b.formatDate))||A.push("xdsoft_weekend");void 0!==b.highlightedDates[k.formatDate(d,b.formatDate)]&&(z=b.highlightedDates[k.formatDate(d, b.formatDate)],A.push(void 0===z.style?"xdsoft_highlighted_default":z.style),J=void 0===z.desc?"":z.desc);b.beforeShowDay&&a.isFunction(b.beforeShowDay)&&A.push(b.beforeShowDay(d));I&&(f+="",I=!1,b.weeks&&(f+=""+H+""));f+='
'+n+"
";d.getDay()===b.dayOfWeekStartPrev&&(f+="",I=!0);d.setDate(n+1)}v.html(f+"");m.find(".xdsoft_label span").eq(0).text(b.i18n[r].months[l.currentTime.getMonth()]); m.find(".xdsoft_label span").eq(1).text(l.currentTime.getFullYear()+b.yearOffset);C=d=L="";var O=0;!1!==b.minTime&&(g=l.strtotime(b.minTime),O=60*g.getHours()+g.getMinutes());var P=1440;!1!==b.maxTime&&(g=l.strtotime(b.maxTime),P=60*g.getHours()+g.getMinutes());!1!==b.minDateTime&&(g=l.strToDateTime(b.minDateTime),k.formatDate(l.currentTime,b.formatDate)===k.formatDate(g,b.formatDate)&&(C=60*g.getHours()+g.getMinutes(),C>O&&(O=C)));!1!==b.maxDateTime&&(g=l.strToDateTime(b.maxDateTime),k.formatDate(l.currentTime, b.formatDate)===k.formatDate(g,b.formatDate)&&(C=60*g.getHours()+g.getMinutes(),C=P||n'+k.formatDate(e,b.formatTime)+""};if(b.allowTimes&&a.isArray(b.allowTimes)&& b.allowTimes.length)for(g=0;gn;n+=b.step)C=60*g+n,C=P||(d=(10>g?"0":"")+g,C=(10>n?"0":"")+n,f(d,C));B.html(L);e="";for(g=parseInt(b.yearStart,10);g<=parseInt(b.yearEnd,10);g+=1)e+='
'+(g+b.yearOffset)+"
";G.children().eq(0).html(e); g=parseInt(b.monthStart,10);for(e="";g<=parseInt(b.monthEnd,10);g+=1)e+='
'+b.i18n[r].months[g]+"
";E.children().eq(0).html(e);a(h).trigger("generate.xdsoft")},10);f.stopPropagation()}).on("afterOpen.xdsoft",function(){if(b.timepicker){var a;B.find(".xdsoft_current").length?a=".xdsoft_current":B.find(".xdsoft_init_time").length&&(a=".xdsoft_init_time");if(a){var c=q[0].clientHeight;var d=B[0].offsetHeight; a=B.find(a).index()*b.timeHeightInTimePicker+1;d-ca.deltaY?l.nextMonth():l.prevMonth();return!1});c.on("mousewheel.xdsoft",function(a){if(!b.scrollInput)return!0;if(!b.datepicker&&b.timepicker)return I=B.find(".xdsoft_current").length?B.find(".xdsoft_current").eq(0).index():0,0<=I+a.deltaY&&I+a.deltaYt+p?(l="bottom",g=t+p-d.top):g-=p):g+h[0].offsetHeight>t+p&&(g=d.top-h[0].offsetHeight+1);0>g&&(g=0);k+e.offsetWidth>m&&(k=m-e.offsetWidth)}V(h[0],function(a){if("relative"===b.contentWindow.getComputedStyle(a).getPropertyValue("position")&& m>=a.offsetWidth)return k-=(m-a.offsetWidth)/2,!1});d={position:n,left:b.insideParent?e.offsetLeft:k,top:"",bottom:""};d[l]=b.insideParent?e.offsetTop+e.offsetHeight:g;h.css(d)};h.on("open.xdsoft",function(c){var d=!0;b.onShow&&a.isFunction(b.onShow)&&(d=b.onShow.call(h,l.currentTime,h.data("input"),c));if(!1!==d&&(h.show(),T(),a(b.contentWindow).off("resize.xdsoft",T).on("resize.xdsoft",T),b.closeOnWithoutClick))a([b.ownerDocument.body,b.contentWindow]).on("touchstart mousedown.xdsoft",function N(){h.trigger("close.xdsoft"); a([b.ownerDocument.body,b.contentWindow]).off("touchstart mousedown.xdsoft",N)})}).on("close.xdsoft",function(c){var d=!0;m.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide();b.onClose&&a.isFunction(b.onClose)&&(d=b.onClose.call(h,l.currentTime,h.data("input"),c));!1===d||b.opened||b.inline||h.hide();c.stopPropagation()}).on("toggle.xdsoft",function(){h.is(":visible")?h.trigger("close.xdsoft"):h.trigger("open.xdsoft")}).data("input",c);D=0;h.data("xdsoft_datetime",l);h.setOptions(b); l.setCurrentTime(d());c.data("xdsoft_datetimepicker",h).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){c.is(":disabled")||c.data("xdsoft_datetimepicker").is(":visible")&&b.closeOnInputClick||!b.openOnFocus||(clearTimeout(D),D=setTimeout(function(){c.is(":disabled")||(M=!0,l.setCurrentTime(d(),!0),b.mask&&t(b),h.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(c){c=c.which;if(-1!==[13].indexOf(c)&&b.enterLikeTab)return c=a("input:visible,textarea:visible,button:visible,a:visible"), h.trigger("close.xdsoft"),c.eq(c.index(this)+1).focus(),!1;if(-1!==[9].indexOf(c))return h.trigger("close.xdsoft"),!0}).on("blur.xdsoft",function(){h.trigger("close.xdsoft")})};var z=function(c){var d=c.data("xdsoft_datetimepicker");d&&(d.data("xdsoft_datetime",null),d.remove(),c.data("xdsoft_datetimepicker",null).off(".xdsoft"),a(b.contentWindow).off("resize.xdsoft"),a([b.contentWindow,b.ownerDocument.body]).off("mousedown.xdsoft touchstart"),c.unmousewheel&&c.unmousewheel())};a(b.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl", function(a){17===a.keyCode&&(n=!0)}).on("keyup.xdsoftctrl",function(a){17===a.keyCode&&(n=!1)}).on("keydown.xdsoftcmd",function(a){}).on("keyup.xdsoftcmd",function(a){});this.each(function(){var g=a(this).data("xdsoft_datetimepicker");if(g){if("string"===a.type(e))switch(e){case "show":a(this).select().focus();g.trigger("open.xdsoft");break;case "hide":g.trigger("close.xdsoft");break;case "toggle":g.trigger("toggle.xdsoft");break;case "destroy":z(a(this));break;case "reset":(this.value=this.defaultValue)&& g.data("xdsoft_datetime").isValidDate(k.parseDate(this.value,b.format))||g.data("changed",!1);g.data("xdsoft_datetime").setCurrentTime(this.value);break;case "validate":g=g.data("input");g.trigger("blur.xdsoft");break;default:g[e]&&a.isFunction(g[e])&&(d=g[e](c))}else g.setOptions(e);return 0}"string"!==a.type(e)&&(!b.lazyInit||b.open||b.inline?q(a(this)):v(a(this)))});return d};a.fn.datetimepicker.defaults=p}; (function(a){"function"===typeof define&&define.amd?define(["jquery","jquery-mousewheel"],a):"object"===typeof exports?module.exports=a(require("jquery")):a(jQuery)})(datetimepickerFactory); (function(a){"function"===typeof define&&define.amd?define(["jquery"],a):"object"===typeof exports?module.exports=a:a(jQuery)})(function(a){function g(g){var d=g||window.event,k=r.call(arguments,1),n=0,m=0,b=0,G=0;g=a.event.fix(d);g.type="mousewheel";"detail"in d&&(m=-1*d.detail);"wheelDelta"in d&&(m=d.wheelDelta);"wheelDeltaY"in d&&(m=d.wheelDeltaY);"wheelDeltaX"in d&&(n=-1*d.wheelDeltaX);"axis"in d&&d.axis===d.HORIZONTAL_AXIS&&(n=-1*m,m=0);var E=0===m?n:m;"deltaY"in d&&(E=m=-1*d.deltaY);"deltaX"in d&&(n=d.deltaX,0===m&&(E=-1*n));if(0!==m||0!==n){if(1===d.deltaMode){var q=a.data(this,"mousewheel-line-height");E*=q;m*=q;n*=q}else 2===d.deltaMode&&(q=a.data(this,"mousewheel-page-height"),E*=q,m*=q,n*=q);q=Math.max(Math.abs(m),Math.abs(n));if(!c||q